<!--商品详情-->
<div id="shopCar_order" style="margin-bottom: calc(30vh - 50px)">
    <ul v-for="(shop,index) in list" key="index">
        <li>
            <div class="crm_orderList_title">
                <el-checkbox v-model="shop.checked" @change="change1(shop)">{{shop.GWDC003}}</el-checkbox>
                <p><span>客户：</span>{{shop.GWAKL003}}</p>
                <div class="crm_order_list">
                    <p><span>小计：</span>¥{{shop.count}}</p>
                    <p><span>预计交货日期：</span>
                        <el-date-picker
                                type="date"
                                v-model="shop.date"
                                value-format="yyyy-MM-dd"
                                style="width: 50%">
                        </el-date-picker>
                    </p>
                    <p><span class="el-icon-delete" @click="deleteData(shop)"></span></p>
                </div>
            </div>
            <div class="crm_orderList_content">
                <template>
                    <el-table
                            :data="shop.data"
                            style="width: 100%">
                        <el-table-column label="商品">
                            <template slot-scope="scope">
                                <div class="order_list">
                                    <img :src="scope.row.GWAM015"/>
                                    <p>{{ scope.row.GWCQ001 }}</p>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column label="数量" width="150">
                            <template slot-scope="scope">
                                <p>¥{{scope.row.GWCQ004}}/{{scope.row.GWCQ003}}</p>
                            </template>
                        </el-table-column>
                        <el-table-column label="操作" width="100">
                            <template slot-scope="scope">
                                <el-button
                                        size="mini"
                                        type="danger"
                                        @click="handleDelete(scope.$index, scope.row)">删除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="crm_free" :hidden="shop.length == 0">
                        <el-collapse v-model="activeName">
                            <el-collapse-item title="添加赠品" name="1">
                                <template>
                                    <el-table :data="shop.result" style="width: 100%" class="warning-row"
                                              highlight-current-row="false">
                                        <el-table-column prop="goods" label="商品">
                                            <template slot-scope="scope">
                                                <div class="free_list">
                                                    <img :src="scope.row.GWAM015"/>
                                                    <p>{{ scope.row.GWDCZ004 }}</p>
                                                </div>
                                            </template>
                                        </el-table-column>
                                        <el-table-column prop="price" label="单价" width="100">
                                            <template slot-scope="scope">{{ scope.row.GWDCZ005 }}</template>
                                        </el-table-column>
                                        <el-table-column label="数量" width="200">
                                            <template slot-scope="scope">
                                                <el-input-number v-model="scope.row.num" size="mini"
                                                                 @change="handleChange" :min="0"
                                                                 label="描述文字"></el-input-number>
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                </template>
                            </el-collapse-item>
                        </el-collapse>
                    </div>
                </template>
            </div>
        </li>
    </ul>

    <div class="crm_footer">
        <div class="crm_footer_content">
            <el-checkbox v-model="checked" @change="handleCheckAllChange">全选</el-checkbox>
            <div class="crm_footer_btn">
                <p><span>合计:</span>
                    <small>¥</small>
                    <strong>{{account}}</strong></p>
                <el-button type="primary" @click="saveData">下单</el-button>
                <el-button @click="cancel">关闭</el-button>
            </div>

        </div>
    </div>
</div>
<script>
    require(["pc/system/shopCar_order"], $.noop);
</script>
